-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cluster provision functionality #2452
base: main
Are you sure you want to change the base?
Conversation
cf7e1f7
to
994cfa9
Compare
994cfa9
to
736900f
Compare
6a4413b
to
3b76bb4
Compare
After starting the metdata store service and the grpc server, the node will try to initialize itself by joining an existing cluster. Additionally each node exposes an provision cluster grpc call with which it is possible to provision a cluster (writing the initial NodesConfiguration, PartitionTable and Logs). Nodes can only join after the cluster is provisioned. This fixes restatedev#2409.
3b76bb4
to
9b4eb18
Compare
I've updated the PR wrt your feedback @AhmedSoliman and it turned out to remove quite a bit of the plumbing I initially introduced :-) The grpc handler contains the logic to provision the required metadata for a cluster. Whether a metadata store requires an explicit provision step or not, is now encapsulated in the Joining a cluster happens independently of the provision step. This means that the node which executes the cluster provision will bump its own |
After starting the metdata store service and the grpc server, the node will try to initialize itself by joining an existing cluster or provisioning a new cluster. Either of the two actions will return the NodeId of the node. Moreover, the initialization procedure makes sure that the latest metadata is fetched from the metadata store.
The cluster provisioning will ensure that all relevant metadata has been written to the metadata store. This includes the initial NodesConfiguration, a PartitionTable that includes the number of partitions and an empty Logs that contains the default log provider configuration.
To use the cluster provisioning feature, one needs to disable
allow-bootstrap
. Otherwise the cluster will try to auto provision itself. You can userestatectl
to provision the cluster via:This fixes #2409.